package com.collection.provider.biz;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.collection.api.entity.ApplyMain;
import com.collection.api.entity.ApplyMainExample;
import com.collection.provider.business.dao.ApplyMainMapper;

/**
  * @Description :
  * @author : zongzp
  * @date :2017年11月7日上午9:15:16
  * @version : 1.1.0
  */
@Service
public class ApplyMainBiz {
	
	@Autowired
	private ApplyMainMapper applyMainMapper;
	
	
	public int countByExample(ApplyMainExample example){
		return applyMainMapper.countByExample(example);
	}

	public int deleteByExample(ApplyMainExample example){
    	return applyMainMapper.deleteByExample(example);
    }

    public int deleteByPrimaryKey(Integer applyMainId){
    	return applyMainMapper.deleteByPrimaryKey(applyMainId);
    }

    public int insert(ApplyMain record){
    	return applyMainMapper.insert(record);
    }

    public int insertSelective(ApplyMain record){
    	return applyMainMapper.insertSelective(record);
    }

    public List<ApplyMain> selectByExample(ApplyMainExample example){
    	return applyMainMapper.selectByExample(example);
    }

    public ApplyMain selectByPrimaryKey(Integer applyMainId){
    	return applyMainMapper.selectByPrimaryKey(applyMainId);
    }

    public int updateByExampleSelective(@Param("record") ApplyMain record, 
    		@Param("example") ApplyMainExample example){
    	return applyMainMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(@Param("record") ApplyMain record, 
    		@Param("example") ApplyMainExample example){
    	return applyMainMapper.updateByExample(record, example);
    }

    public int updateByPrimaryKeySelective(ApplyMain record){
    	return applyMainMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(ApplyMain record){
    	return applyMainMapper.updateByPrimaryKey(record);
    }
    /**
	  *
	  *@destruction：通过用户的applyid查询用户的申请信息
	  *@author：zongzhiping
	  *@date:2018年1月16日
	  *@param args
	  *
	**/
	public Map<String, Object> selectUserApplyInfoByApplyId(Integer applyMainId) {
		return applyMainMapper.selectUserApplyInfoByApplyId(applyMainId);
	}
}

